With rapid development of wireless communications systems, forms of wireless communications services are becoming diversified, and spectrum resources are becoming scarce. Device to device (D2D for short) communication can effectively improve spectrum utilization of a system, and the D2D communication can be used in lots of scenarios. Therefore, in the 3rd Generation Partnership Project (3GPP for short), the D2D communication has been integrated into Long Term Evolution (LTE for short), and is referred to as a proximity-based service (ProSe for short).
In the prior art, before a terminal performs a proximity-based service each time, a base station accessed by the terminal needs to allocate, to the terminal, a radio resource used for the proximity-based service, and then the terminal performs the proximity-based service by using the radio resource allocated by the base station. A base station needs to allocate, to each terminal, a radio resource used for a proximity-based service, and each time of radio resource allocation requires a period of time. Therefore, when a relatively large quantity of terminals need to perform a proximity-based service, it may take a relatively long period of time to allocate radio resources to the terminals, affecting efficiency of performing a proximity-based service by a terminal.